package com.haierCamera.customapplication.ui.main;

import android.os.Bundle;

import com.haierCamera.customapplication.BaseActivity;
import com.haierCamera.customapplication.R;
import com.haierCamera.customapplication.databinding.HzklActivityNotifyGreenLightBinding;

import androidx.databinding.DataBindingUtil;

public class HZKLNotifyGreenLightActivity extends BaseActivity {

    HzklActivityNotifyGreenLightBinding binding;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = DataBindingUtil.setContentView(this, R.layout.hzkl_activity_notify_green_light);
        binding.setLifecycleOwner(this);
        binding.imgReturn.setOnClickListener((v)->{
            finish();
        });

        initImage();
    }

    private void initImage(){
        if (getIntent().getStringExtra("dt").contains("TF1D")) {
            binding.ivImg.setImageResource(R.drawable.hzkl_tf1d_key);
        } else if (getIntent().getStringExtra("dt").contains("TE3")) {
            binding.ivImg.setImageResource(R.drawable.hzkl_te3_key);
        } else if (getIntent().getStringExtra("dt").contains("TF1T")) {
            binding.ivImg.setImageResource(R.drawable.hzkl_tf1t_key);
        } else if (getIntent().getStringExtra("dt").contains("TP7S")) {
            binding.ivImg.setImageResource(R.drawable.hzkl_tp7se_key);
        } else if (getIntent().getStringExtra("dt").contains("TP2E")) {
            binding.ivImg.setImageResource(R.drawable.hzkl_tp2e_key);
        } else if (getIntent().getStringExtra("dt").contains("TC2E")) {
            binding.ivImg.setImageResource(R.drawable.hzkl_tc2e_key);
        } else if (getIntent().getStringExtra("dt").contains("TF3")) {
            binding.ivImg.setImageResource(R.drawable.hzkl_tf3_key);
        } else  {
            binding.ivImg.setImageResource(R.drawable.hzkl_tp2e_key);
        }
    }


}
